package com.cq.hd.member.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.cq.hd.common.pagination.Page;
import com.cq.hd.member.api.dto.BusinessChangePointsDto;
import com.cq.hd.member.api.dto.OrderItemPointsSettleDto;
import com.cq.hd.member.api.dto.ShareActivePointsDto;
import com.cq.hd.member.api.dto.UserPointsAccountPageDto;
import com.cq.hd.member.api.vo.UserPointsAccountPageVo;
import com.cq.hd.member.po.TbUserPointsAccountPo;

import java.math.BigDecimal;

public interface TbUserPointsAccountService extends IService<TbUserPointsAccountPo> {
    // 订阅获得积分
    BigDecimal getSubscribePoints(Long businessId, Long userId);

    // 取消订阅，扣回积分
    void returnSubscribePoints(Long businessId, Long userId);

    // 分享活动赚积分
    void getShareActivePoints(ShareActivePointsDto shareActivePointsDto);

    // 策划人手动调整积分
    Boolean businessChangePoints(BusinessChangePointsDto businessChangePointsDto);

    // 积分兑换
    Boolean exchange(Long productId, Long userId);

    // 订单结算，给用户、经纪人发放积分
    Boolean subOrderSettlePoints(OrderItemPointsSettleDto orderItemPointsSettleDto);

    // 订单取消，退回积分
    Boolean cancelOrderSendBackPoints(Long orderId);

    // 用户积分列表
    Page<UserPointsAccountPageVo> pageUserPointsAccount(UserPointsAccountPageDto userPointsAccountPageDto);

    // 用户积分详情
    UserPointsAccountPageVo userPointsAccount(Long businessId, Long userId);
}
